package com.cyd.demo3.controller;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @Description : 描述
 * Created by cyd on 2021-05-13 11:28:20
 */
@WebServlet(name = "threeServlet", value = "/three")
public class ThreeServlet extends HttpServlet {

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("UTF-8");
        resp.setCharacterEncoding("UTF-8");
        resp.setContentType("text/html");
        System.out.println("three：负责韭菜炒鸡蛋");
        PrintWriter out = resp.getWriter();
        out.print("<h2>three：负责韭菜炒鸡蛋</h2>");
    }
}
